<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>无标题文档</title>
    <script type="text/javascript" src="http://static.flowplayer.org/js/flowplayer-3.2.6.min.js"></script>
  </head>

  <body>
    <a
      href="http://ms.happyerp.com/images/h264.mp4"
      style="display:block;width:425px;height:300px;"
      id="player">
    </a>

    <script language="JavaScript">
      flowplayer("player", "http://releases.flowplayer.org/swf/flowplayer-3.2.7.swf",{

        clip:{
          autoPlay:true,//是否自动播放，默认true
          autoBuffering:true,//是否自动缓冲视频，默认true
          onFinish:function(){
            alert("播放结束");
            $f().play('http://ms.happyerp.com/images/test.mp4')
          },
          onSeek :function(){
            alert("我给拖了");
          }
        },
        onLoad: function(){
          this.setVolume(30);
          //alert("player loaded");
        }
      }
    );

      //alert($f("player").getVersion());

      $f("*").each(function() {
        console.info(this.getVersion());
      });

    </script>


    <input type="button" value="Stop"  onclick="$f().stop();" />
    <input type="button" value="Pause" onclick="$f().pause();" />
    <input type="button" value="Play" onclick="$f().play().setVolume(80);" />

    <button onClick="$f().close()">关闭</button>
    <button onClick="$f().hide()">隐藏</button>
    <button onClick="$f().show()">显示</button>
    <button onClick="alert($f().getTime())">时间</button>
    <button onClick="alert($f().getVolume())">得到音量</button>
    <button onClick="alert($f().getTime())">得到当前时间轴</button>
    <button onClick="alert($f().getClip().fullDuration/60)">得到片长</button>
    <button onClick="alert($f().getClip().type)">媒体类型</button>
    <button onClick="alert($f().getClip().start=100)">clip开始时间</button>
    <button onClick="alert($f().seek(100))">设置播放时间</button>
    <button onClick="$f().play('http://ms.happyerp.com/images/test.mp4')">切换视频</button>

  </body>
</html>
